]> dgit.raspbian.org Git - gnome-shell.git/commit
overviewControls: Bind state adjustment signals to parent lifetime
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Fri, 31 Oct 2025 03:57:50 +0000 (04:57 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 3 Nov 2025 12:14:29 +0000 (12:14 +0000)
commit935c5a0c540237ea7d1b8e38141577ac20669662
tree7ea3994f0161f1feb60c3d12eec1a92c3939df77
parent60a071052a0e547e813c6da6db8b4fc8d3149398
overviewControls: Bind state adjustment signals to parent lifetime

On tests shutdown we were sometimes getting this error:

  ** Message: 09:29:27.494: Shutting down GNOME Shell

  (gnome-shell:3728700): Gjs-CRITICAL **: 09:29:27.545:
  JS ERROR: TypeError: this._workspacesDisplay is undefined
  _update@resource:///org/gnome/shell/ui/overviewControls.js:599:37
  _initializeUI/<@resource:///org/gnome/shell/ui/main.js:279:14

Which after using the arrow function becomes:

  (gnome-shell:3731979): Gjs-CRITICAL **: 09:30:05.419:
  JS ERROR: TypeError: this._workspacesDisplay is undefined
  _update@resource:///org/gnome/shell/ui/overviewControls.js:599:37
  _init/<@resource:///org/gnome/shell/ui/overviewControls.js:343:67
  _initializeUI/<@resource:///org/gnome/shell/ui/main.js:279:14

This is because the state adjustement object lifetime is not bound to
the ControlsManager, and so we were potentially accessing to invalid
data

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3943>
js/ui/overviewControls.js